//
//  ViewController.m
//  VoIPTest
//
//  Created by Tg W on 17/2/21.
//  Copyright © 2017年 oopsr. All rights reserved.
//

#import "ViewController.h"

#import "ProviderDelegateTest.h"
#import "AppDelegate.h"
@interface ViewController ()
@property (nonatomic, strong) ProviderDelegateTest *pp;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 0, 100, 100);
    btn.backgroundColor = UIColor.redColor;
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(aaa) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeCustom];
    btn2.frame = CGRectMake(0, 200, 100, 100);
    btn2.backgroundColor = UIColor.blueColor;
    [self.view addSubview:btn2];
    [btn2 addTarget:self action:@selector(bbb) forControlEvents:UIControlEventTouchUpInside];
    
    
    self.pp = [[ProviderDelegateTest alloc]initWithCallManager:[[CallManager alloc]init]];
}

-(void)bbb{
    [[NSNotificationCenter defaultCenter] postNotificationName:@"klk" object:nil userInfo:nil];
}


-(void)aaa{
    
    [self.pp reportIncomingCall:[NSUUID UUID] andHandle:@"11111" andHasvideo:NO andCompletion:^(NSError * _Nonnull error) {
        
    }];
    

}

- (IBAction)start:(id)sender {

// 

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
